// 04myCenter/01myWallet/myWallet.js
var co = require('../../resource/js/common.js')
var M = require('../../resource/js/md5.js')
var app = getApp()
var _this, _data
Page({

   /**
    * 页面的初始数据
    */
   data: {
      bizList: '', //商家列表
   },

   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function(options) {
      _this = this
      _data = this.data
      this.getBizList()
   },
   //获取企业列表
   getBizList: function() {
      var url = 'jyhs/Admin/getBizList'
      co.getShareApi(url, {
         User_ID: app.Data.userInfo.User_ID
      }, function(res) {
         if (res.code == 0) {
            console.log('res1', res)
            _this.setData({
               bizList: res.data
            })
         } else {
            //co.toastAllText(res.msg)
         }
      })
   },
   //跳转到企业钱包
   toEnterPrise: function(e) {
      var biz_ID = e.currentTarget.dataset.biz_id
      //console.log(biz_ID)
      wx.navigateTo({
         url: '/04myCenter/01myWallet/02enterpriseChange/enterpriseChange?biz_ID=' + biz_ID,
      })
   },
})